package com.ruoyi.edh.domain.model;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

/**
 * @version :
 * @program: easyBuy
 * @description: 购物车model
 * @author: 周爱鸿
 * @create: 2020-09-03 09:15
 **/
public class EdhShoppingCartModel {

	@ApiModel("加购商品model")
	@Data
	public static class Insert{

		/** 商品规格id */
		@ApiModelProperty("商品规格id")
		@NotNull(message = "商品规格id不能为空")
		private Long goodsSpecificationsId;

		/** 微店id */
		@ApiModelProperty("微店id")
		private Long microshopId;

		/** 数量 */
		@ApiModelProperty("数量")
		@NotNull(message = "数量不能为空")
		private Integer amount;
	}

	@ApiModel("修改加购商品数量model")
	@Data
	public static class Update{

		/** 商品规格id */
		@ApiModelProperty("购物车id")
		@NotNull(message = "购物车id不能为空")
		private Long shoppingCartId;

		/** 数量 */
		@ApiModelProperty("数量")
		@NotNull(message = "数量不能为空")
		private Integer amount;
	}
}
